package com.minimalist.basic.entity.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class MDictTableDef extends TableDef {

    /**
     * 字典表 实体类。

 @author 小太阳
 @since 2024-10-18
     */
    public static final MDictTableDef MDICT = new MDictTableDef();

    /**
     * ID自增
     */
    public final QueryColumn ID = new QueryColumn(this, "id");

    /**
     * 字典ID
     */
    public final QueryColumn DICT_ID = new QueryColumn(this, "dict_id");

    /**
     * 状态  0禁用 1正常
     */
    public final QueryColumn STATUS = new QueryColumn(this, "status");

    /**
     * 逻辑删除
     */
    public final QueryColumn DELETED = new QueryColumn(this, "deleted");

    /**
     * 字典key
     */
    public final QueryColumn DICT_KEY = new QueryColumn(this, "dict_key");

    /**
     * 版本号
     */
    public final QueryColumn VERSION = new QueryColumn(this, "version");

    /**
     * 创建人ID
     */
    public final QueryColumn CREATE_ID = new QueryColumn(this, "create_id");

    /**
     * 字典描述
     */
    public final QueryColumn DICT_DESC = new QueryColumn(this, "dict_desc");

    /**
     * 字典名称
     */
    public final QueryColumn DICT_NAME = new QueryColumn(this, "dict_name");

    /**
     * 字典类型
     */
    public final QueryColumn DICT_TYPE = new QueryColumn(this, "dict_type");

    /**
     * 更新人ID
     */
    public final QueryColumn UPDATE_ID = new QueryColumn(this, "update_id");

    /**
     * 字典样式，对应前端Tag组件的type
     */
    public final QueryColumn DICT_CLASS = new QueryColumn(this, "dict_class");

    /**
     * 字典排序值
     */
    public final QueryColumn DICT_ORDER = new QueryColumn(this, "dict_order");

    /**
     * 字典value
     */
    public final QueryColumn DICT_VALUE = new QueryColumn(this, "dict_value");

    /**
     * 创建时间
     */
    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    /**
     * 更新时间
     */
    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, DICT_ID, STATUS, DICT_KEY, VERSION, CREATE_ID, DICT_DESC, DICT_NAME, DICT_TYPE, UPDATE_ID, DICT_CLASS, DICT_ORDER, DICT_VALUE, CREATE_TIME, UPDATE_TIME};

    public MDictTableDef() {
        super("", "m_dict");
    }

    private MDictTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    @Override
    public MDictTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new MDictTableDef("", "m_dict", alias));
    }

}
